package com.aiyige.page.filter.model;

public class Order {
    public static final String GENERAL = "integrated";
    public static final String SALES_VOLUME_DESC = "sellCountDesc";
    public static final String VIEW_COUNT_DESC = "viewCountDesc";
    public static final String PRICE_DESC = "priceDesc";
    public static final String PRICE_ASC = "priceAsc";
    public static final String PUBLISH_TIME_DESC = "onsellTimeDesc";
    String title;
    String key;
    boolean selected;

    public Order() {
    }

    private Order(Builder builder) {
        setTitle(builder.title);
        setKey(builder.key);
        setSelected(builder.selected);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    public static final class Builder {
        private String title;
        private String key;
        private boolean selected;

        private Builder() {
            title = "";
            key = "";
            selected = false;
        }

        public Builder title(String val) {
            title = val;
            return this;
        }

        public Builder key(String val) {
            key = val;
            return this;
        }

        public Builder selected(boolean val) {
            selected = val;
            return this;
        }

        public Order build() {
            return new Order(this);
        }
    }
}
